<!DOCTYPE HTML>
<html>
<head>
<!-- Change this if you want to allow scaling -->
<meta name="viewport" content="width=device-width,target-densitydpi=device-dpi,user-scalable=no,initial-scale=1.0">
<meta http-equiv="Content-type" content="text/html; charset=utf-8">

<title>Orari Treno</title>
<link href="css/mobiscroll-2.0.3.full.min.css" rel="stylesheet" type="text/css" />
<link type="text/css" href="css/common.css" rel="stylesheet" />
<link rel="stylesheet" href="css/jquery.mobile-1.2.0.min.css" />

<script type="text/javascript" src="http://www.blackberry.com/app_includes/asdk/adBanner.js"></script>
<script type="application/javascript" charset="utf-8" src="js/jquery-1.8.2.min.js"></script>
<script type="application/javascript" charset="utf-8" src="js/jquery.mobile-1.2.0.min.js"></script>
<script type="application/javascript" charset="utf-8" src="js/variabili.js" ></script>
<script type="application/javascript" charset="utf-8" src="js/jquery.smart_autocomplete.js" ></script>
<script type="application/javascript" charset="utf-8" src="js/opzioni.js" ></script>
<script type="application/javascript" charset="utf-8" src="js/XMLWriter-1.0.0-min.js" ></script>
<script type="application/javascript" charset="utf-8" src="js/cordova.2.2.0.js" ></script>
<script type="application/javascript" charset="utf-8" src="js/common.js" ></script>
<script type="application/javascript" charset="utf-8" src="js/mobiscroll-2.0.3.full.min.js"></script>  
</head>
<body onload="onDeviceReady()">
			<h1 id="Size" style="display:none">&nbsp;</h1>
		<div data-role="content" id="contentMain" class="ui-body-b">
			<span style="display:none" id="testSize">&nbsp;</span>
		</div>
		<div data-role="page" id="com" ><div style="display:none"  data-role="content" id="contentMain" class="ui-body-b"><h1 style="display:none"  id="testSize">&nbsp;</h1>&nbsp;</div></div>
	<div data-role="page" id="mainpage" class="ui-body-b" data-theme="b" 
		style="height: 100%; position: absolute;">
		<div data-role="header" data-position="fixed" id="mainHeader" data-theme="b"  >
			<div class="ui-grid-b" >
				<div class="ui-block-a" style="width: 15%;"></div>
				<div class="ui-block-b" style="width: 70%;vertical-align:middle;"> 
					<h1 id="hmain" >Orario&nbsp;Treni</h1>
				</div>
				<div class="ui-block-c" style="width: 15%;">
					<div style="float:right;vertical-align:middle;">
						<a style="text-decoration: none; color: white;" href="javascript:setImpostazioni();">
							<img alt="indietro" id="hmainImp" src="resources/impostazioni.png" >
						</a>
					</div>
				</div>	
			</div>							
		</div>
		<div data-role="content" id="contentMain" class="ui-body-b">		
			<select id="storiaSelect" onchange="changeStoria()"><option>Ricerche passate</option></select>
			<div class="ui-grid-b">					
				<div class="ui-block-a" id="spartenza">						
						<input type="text" id="partenza" value="partenza" spellcheck="off" autocorrect="off" autocapitalize="off" autocomplete="off" 
							onfocus="javascript:stazione('partenza');" >
				</div>
				<div class="ui-block-b" id="lpartenza">
				</div>
			</div>			
			<div class="ui-grid-c">					
				<div class="ui-block-a" id="sarrivo">
						<input type="text" id="arrivo" value="arrivo" spellcheck="off" autocorrect="off" autocapitalize="off" autocomplete="off" 
							onfocus="javascript:stazione('arrivo');" >
				</div> 
				<div class="ui-block-b" id="larrivoMid"></div>
				<div class="ui-block-c" id="larrivo">
				 <a href="#" data-role="button" id="britorno" data-inline="true" onClick=changeField();>ritorno</a>
				</div>
			</div>
			
			<div class="ui-grid-b"><!-- onClick="selectDate()" -->
				<div id='dateIn' class="ui-block-a" >
					<input type="date" class="input" name="select-date" id="select-date"  value="">
				</div> 			
				<div id='textIn' class="ui-block-a" >
					<input name="select-date-andr" id="select-date-andr" />
				</div> 										
				<div class="ui-block-b" style="width:10%"></div>
				<div id='textOra' class="ui-block-c" >
				  <input name="select-ora-andr" id="select-ora-andr" />
				</div>
				<div id='timeOra' class="ui-block-c" >
					<input type="time" class="input" name="select-ora" id="select-ora" value="">
				</div>		
			</div>
			<div >
        <a href="#" data-role="button" id="cercaMain" data-rel="dialog" data-inline="true" onClick=getOrari();>cerca</a>
		  </div>						
					
		</div>	
		<div data-role="footer" id="footerMain" data-position="fixed" data-theme="b">
			<div id="divId">
				<!-- Banner ad will be displayed here -->
			</div>  
		</div>		
	</div>
	<!-- PAGINA RICERCA DETTAGLI -->
	  <div data-role="page" id="searchpage" class="ui-body-b" data-theme="b" 
		style="height: 100%; position: absolute;">
		<div data-role="header" id="orariheader" data-position="fixed" data-theme="b">		
			<div class="ui-grid-b" id="orariHeaderTable" >
				<div class="ui-block-a"style="width: 15%;">
					<a   href="javascript:onBackKeyDown()">
						<img alt="indietro" class="imgInd" id="hindietroOrari" src="resources/indietro.png"  >
					</a>
				</div>
				<div class="ui-block-b" style="width: 70%;"> 
					<h1 id="horari"  >Ricerca Treno</h1>						
				</div>
				<div class="ui-block-c"style="width: 15%;"></div>
			</div>						
		</div>	
		<div id="orariSpace"></div>	
		<div data-role="content" id="searchDett" class="ui-body-b">
		<div id="spaceDiv"></div>		
			<select id="changeStoriaDett" onchange="changeStoriaDett()"><option>Ricerche passate</option></select>
			
			<div class="ui-grid-b">					
				<div class="ui-block-a" id="sntreno">
						<input type="text" id="dett" value="N. Treno" onfocus=javascript:focusTreno(); onblur=javascript:focusTreno();>
				</div>
				<div class="ui-block-b"></div>
				<div class="ui-block-c"></div>
			</div>
			<div class="ui-grid-c">					
				<div class="ui-block-a" id="sarrivo">
						<input type="text" id="Descrizione" value="Descrizione" onfocus=javascript:focusDesc(); onblur=javascript:focusDesc()>
				</div>
				<div class="ui-block-b"></div>
				<div class="ui-block-c"></div>
			</div>
			
			
			<div >
        <a href="#" data-role="button" id="cercaMain" data-rel="dialog" data-transition="flip" data-inline="true" onClick=getDettaglioSearch();>cerca</a>
		  </div>						
					
		</div>	
		<div data-role="footer" id="footerMain" data-position="fixed" data-theme="b">
			<div id="divIdSearch">
				<!-- Banner ad will be displayed here -->
			</div>  
		</div>		
	</div>
	<!--  PAGINA ORARI -->	
	
	<div data-role="page" id="oraripage" class="ui-body-b" data-theme="b" >
		<div data-role="header" id="orariheader" data-position="fixed" data-theme="b">		
			<div class="ui-grid-b" id="orariHeaderTable" >
				<div class="ui-block-a">
					<a id="aOrariPage"  href="javascript:onBackKeyDown()">
						<img alt="indietro" class="imgInd"  id="hindietroOrari" src="resources/indietro.png"  >
					</a>
				</div>
				<div class="ui-block-b"> 
					<h1 id="horari"  >Elenco</h1>						
				</div>
				<div class="ui-block-c"></div>
			</div>						
		</div>	
	
		<div data-role="content" id="orari" data-id="nav" class="ui-body-b" >
			<div id="tabella-orari" data-role="collapsible-set">
			</div>			
		</div>	
		<div id="spaceOrari"></div>	
		<div data-role="footer" id="footerOrari" data-position="fixed" data-theme="b">
			<div id="divIdOrari">
				<!-- Banner ad will be displayed here -->
			</div>  
		</div>	
	</div>

	<!--  PAGINA DETTAGLI -->
	
	<div data-role="page" id="dettaglipage" class="ui-body-b" data-theme="b" >
		<div data-role="header"  data-position="fixed" id="dettagliheader" data-theme="b">
			<div class="ui-grid-b" id="dettagliHeaderTable" >
				<div class="ui-block-a" id="dettagliHeaderA">
					<a id="backDettagli"  href="javascript:onBackKeyDown()">
						<img alt="indietro" class="imgInd" id="hindietroDettagli" src="resources/indietro.png"  style="vertical-align:middle;">
					</a>
				</div>
				<div class="ui-block-b" id="dettagliHeaderB" style="vertical-align:middle;"><h1 id="hdettagli" ></h1>
				</div>
				<div class="ui-block-c" id="dettagliHeaderC">
					<div style="float:right;vertical-align:middle;">
						<a style="text-decoration: none; color: white;" href="javascript:refreshDettaglio();">
							<img alt="indietro" id="hmainImp" src="resources/aggiorna.png" >
						</a>
					</div>
				</div>
			</div>											
		</div>
		<div data-role="content" id="dettagli" data-id="nav" class="ui-body-b">		
		<div id="tabella-dettagli" data-role="collapsible-set">
			</div>		
		</div>	
		<div id="spaceDettagli"></div>			
		<div data-role="footer" id="footerDettagli" data-position="fixed" data-theme="b">
			<div id="divIdDettagli">
				<!-- Banner ad will be displayed here -->
			</div>  
		</div>	
	</div>
            
            <!--  PAGINA IMPOSTAZIONI -->
            
    <div data-role="page" id="impostazioni"  class="ui-body-b" data-theme="b" 
			style="height: 100%; position: absolute;">
		<div data-role="header" data-position="fixed"  data-theme="b" id="impostazioniHeader" >
			<div class="ui-grid-b" id="impostazioniHeaderTable" >
				<div class="ui-block-a">
					<a style="text-decoration: none; color: white;" href="javascript:onBackKeyDown()">
						<img alt="indietro" class="imgInd" id="hindietroImp" src="resources/indietro.png"  style="vertical-align:middle;">
					</a>
				</div>
				<div class="ui-block-b"><h1 id="himpostazioni">Impostazioni</h1> 
				</div>
				<div class="ui-block-c"></div>
			</div>							
		</div>
		
		<div data-role="content" id="contentImp" class="ui-body-b" >	
			<div class="ui-grid-b" style="width:100%;">
				<div class="ui-block-a"  style="width:33%;">
					<input type="text" readonly="readonly" value="Numero Viaggi:" id="labelImp" >
				</div>
				<div class="ui-block-b"  style="width:33%;">
					<input type="number" id="nreq" value="" >
				</div>
			</div>
			<div class="ui-grid-b" style="width:100%;">
				<div class="ui-block-a"  style="width:33%;">
					<input type="text" readonly="readonly" value="Numero Ricerche:" id="labelImp" >					
				</div>
				<div class="ui-block-b"  style="width:33%;">
					<input type="number" id="indice" value="" >
				</div>
			</div>
			<form> 
  				<fieldset  class="ui-grid-a" style="width:100%;">
  					<div class="ui-block-a"  style="width:33%;">
  						<input type="text" readonly="readonly" value="Tema:" id="labelImp" >	 						
  					</div>   					
   					<div class="ui-block-b"  style="width:33%;">
   					  <Select id="temaSelect">
   						<option value"0">Nero</option>
   					    <option value"1">Blue</option>
   						<option value"2">Grigio Chiaro</option>
   						<option value"3">Grigio Scuro</option>
   						<option value"4">Giallo</option>
   						<option value"5">Verde</option>
   					 </Select>
   				   </div>    		  							
				</fieldset>
			</form>
			<form> 
				<fieldset  class="ui-grid-a" style="width:100%;">
  					<div class="ui-block-a" style="width:33%;">
  						<input type="text" readonly="readonly" value="Carattere:" id="labelImp" >	 						
  					</div>   					
   					<div class="ui-block-b" style="width:33%;" >
   						<Select id="carattereSelect">
   							<option value"0">Piccolo</option>
   							<option value"1">Medio</option>
   							<option value"2">Grande</option>
   							<option value"3">Extra</option>   							
   						</Select>
   					</div>    		  							    				
				</fieldset>
			</form>
			<div class="ui-grid-b" style="width:100%;">
				<div class="ui-block-a"></div>
				<div class="ui-block-b"><a style="width:100%;" href="#" data-role="button" data-rel="dialog" data-inline="true" onClick=salva();>Salva </a></div>
				<div class="ui-block-c"></div>													
			</div>	
		</div>	
		<div data-role="footer" id="footerImp" data-position="fixed" data-theme="b">
			<div id="divIdImp">
				<!-- Banner ad will be displayed here -->
			</div>  
		</div>				
	</div>  
	<div id="stripNotificaOffline" class="stripNotifica">
		     Assenza di rete. Consultazione offLine    
	</div>
	<div id="stripNotificaOnline" class="stripNotifica">
		     Connesso in rete. Consultazione onLine    
	</div>
	<div id="strip" class="stripNotifica">
		     <span id="testStrip"></span>    
	</div>
	<div id="wait" ></div>
	<div id="tableWait"><table><tr><td><img id="imgLoad" src="resources/busy.gif" /></td><td>Attendi ...</td></tr></table></div>
</body>
</html>